Skip to content

feat: add additional metadata in the logs#81

Open
yharaskrik wants to merge 1 commit intosnarktank:mainfrom
yharaskrik:jaybell/add-title-and-description-to-iteration-logs
Open

feat: add additional metadata in the logs#81
yharaskrik wants to merge 1 commit intosnarktank:mainfrom
yharaskrik:jaybell/add-title-and-description-to-iteration-logs

Conversation

@yharaskrik
Copy link

When running ralph you don't really know what task it is working on without opening the prd.json and scrolling down till you find the first incomplete user story, this PR updates ralph so that it will output the title and description alongside what iteraton it is processing and metadata about the user story being completed.

@greptile-apps
Copy link

greptile-apps bot commented Feb 3, 2026

Greptile Overview

Greptile Summary

Enhanced Ralph's iteration logging by displaying the current user story title and description at the start of each iteration, making it easier to track progress without manually inspecting prd.json.

  • Extracts highest priority incomplete user story using jq queries
  • Displays story title and description in iteration header
  • Falls back gracefully when PRD file is missing or has no incomplete stories
  • Uses safe bash practices with empty string defaults and error suppression

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward logging enhancements that don't modify core logic, use safe bash patterns with proper error handling, and improve observability
  • No files require special attention

Important Files Changed

Filename Overview
ralph.sh Added logging to display current user story title and description before each iteration

Sequence Diagram

sequenceDiagram
    participant ralph.sh
    participant prd.json
    participant AI Tool (Amp/Claude)
    
    loop Each Iteration (1 to MAX_ITERATIONS)
        ralph.sh->>prd.json: Read file
        prd.json-->>ralph.sh: Return PRD data
        ralph.sh->>ralph.sh: Extract highest priority story<br/>with passes=false using jq
        ralph.sh->>ralph.sh: Store STORY_TITLE and STORY_DESC
        ralph.sh->>ralph.sh: Print iteration header with<br/>story title and description
        ralph.sh->>AI Tool (Amp/Claude): Execute with instructions
        AI Tool (Amp/Claude)-->>ralph.sh: Return OUTPUT
        ralph.sh->>ralph.sh: Check for COMPLETE signal
        alt Contains COMPLETE
            ralph.sh->>ralph.sh: Exit successfully
        else No COMPLETE
            ralph.sh->>ralph.sh: Continue to next iteration
        end
    end
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant